<template>
  <view>
   <view class="header">
     <view class="back" @click="back()">
       <uni-icons type="left" size="20"></uni-icons>
     </view>
     <text>应用中心</text>
   </view>
    <view class="container">
      <core-nav title='校园导览' url='/static/fujin.png' @goSchoolInfo='goSchoolInfo' ml="20"></core-nav>
      <core-nav title='我的社区' url='/static/shequ.png' @goCommunity='goCommunity' ml="20"></core-nav>
      <core-nav title='每日答题' url='/static/meiridati.png' @goQuestions='goQuestions' ml="20"></core-nav>
      <core-nav title='积分商城' url='/static/shangcheng.png' @goIntegralShop='goIntegralShop' ml="20"></core-nav>
      <core-nav title='积分详情' url='/static/xiangqing.png' @goIntegralDetail='goIntegralDetail' ml="20"></core-nav>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {

      };
    },
    methods: {
      back() {
        uni.navigateBack()
      },
      goCommunity() {
        uni.switchTab({
          url: '/pages/community/community'
        })
      },
      goSchoolInfo() {
        uni.switchTab({
          url: '/pages/info/info'
        })
      },
      goQuestions() {
        uni.navigateTo({
          url: '/subpkg/questions/questions'
        })
      },
      goIntegralShop() {
        uni.navigateTo({
          url: '/subpkg/integralShop/integralShop'
        })
      },
      goIntegralDetail() {
        uni.navigateTo({
          url: '/subpkg/integralDetail/integralDetail'
        })
      }
    }
  }
</script>

<style lang="scss">
  .header {
    position: relative;
    width: 100%;
    height: 140rpx;
    text-align: center;
    font-size: 36rpx;
    font-weight: 700;
    line-height: 170rpx;
    background-color: #fff;
  
    .back {
      position: absolute;
      top: 4rpx;
      left: 23rpx;
      height: 50rpx;
    }
  }
  
  .container {
    display: flex;
    flex-wrap: wrap;
    width: 94%;
    margin: 30rpx auto;
    background-color: #fff;
  }
</style>